# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: DrZaius <lou[at]fakeoutdoorsman[dot]com>
# Contributor: pumbur

pkgname=opus
pkgver=1.2.1
pkgrel=1
pkgdesc="Totally open, royalty-free, highly versatile audio codec"
arch=(i686 x86_64)
url="https://www.opus-codec.org/"
license=(BSD)
depends=(glibc)
makedepends=(doxygen)
source=(https://archive.mozilla.org/pub/$pkgname/$pkgname-$pkgver.tar.gz)
sha256sums=('cfafd339ccd9c5ef8d6ab15d7e1a412c054bf4cb4ecbbbcc78c12ef2def70732')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --disable-static \
    --enable-custom-modes \
    --enable-ambisonics
  make
}

check() {
  cd $pkgname-$pkgver
  make check
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
